package com.liuyucheng.annotation;

public class TestAnnotation {

    public static void main(String[] args) {
        Person person = Person.builder().build();
        Class clazz = person.getClass();

        if(clazz.isAnnotationPresent(InfoAnnotation.class)){
            System.out.println("Person类上配置了Info注解！");
            InfoAnnotation infoAnnotation = (InfoAnnotation) clazz.getAnnotation(InfoAnnotation.class);
            System.out.println("person.name :" + infoAnnotation.value() + ",person.isDelete:" + infoAnnotation.isDelete());
        }
    }
}
